package com.cskaoyan.controller.wx.lxc;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.wxlxc.WxCatalogCurrentVo;
import com.cskaoyan.service.wx.lxc.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {

    @Autowired
    WxCatalogService wxCatalogService;

    @RequestMapping("current")
    public BaseRespVo queryCatalogCurrent(Integer id) {
        WxCatalogCurrentVo wxCatalogCurrentVo = wxCatalogService.queryCatalogCurrent(id);
        return BaseRespVo.succeed(wxCatalogCurrentVo);
    }

    @RequestMapping("index")
    public BaseRespVo queryCatalogIndex() {
        WxCatalogCurrentVo wxCatalogCurrentVo = wxCatalogService.queryCatalogIndex();
        return BaseRespVo.succeed(wxCatalogCurrentVo);
    }
}
